package com.example.demo.friendship.controller;

import com.example.demo.friendship.model.mongodb.FriendRelation;
import com.example.demo.friendship.serviceimpl.PagePostServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class PagePostController {

    @Autowired
    private PagePostServiceImpl pagePostService;

    @RequestMapping(value = "/pagePost/save",method = RequestMethod.GET)
    @ApiOperation(value = "保存数据")
    public Object save(){
        return pagePostService.savePost();
    }

    @RequestMapping(value = "/pagePost/addFans",method = RequestMethod.GET)
    @ApiOperation(value = "保存数据")
    public Object addFans(){
        return pagePostService.addFansCount();
    }

    @RequestMapping(value = "/pagePost/doMap",method = RequestMethod.GET)
    @ApiOperation(value = "保存数据")
    public Object doMap(){
        return pagePostService.doMapReduce();
    }
}
